{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "11762ebf",
   "metadata": {},
   "source": [
    "## 本周学习内容\n",
    "\n",
    "### 1.课本项目直接运行\n",
    "\n",
    "### 2.认识变量\n",
    "\n",
    "### 3.赋值的概念\n",
    "\n",
    "### 4.python语言的基本结构：（文本、数值）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "0422770c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "41"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 回顾上周 模块.tab\n",
    "import datetime\n",
    "datetime.datetime.today().minute"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "id": "0e8a37f3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "not an odd minute\n"
     ]
    }
   ],
   "source": [
    "# 1. 课本模块直接运行\n",
    "# 先找到模块，然后\n",
    "from datetime import datetime\n",
    "\n",
    "odds = [1,3,5,7,9,11,13,15,17,19,\n",
    "        21,23,25,27,29,31,33,35,37,39,\n",
    "        41,43,45,47,49,51,53,55,57,59]\n",
    "\n",
    "right_this_minute = datetime.today().minute # 一直在变化的当前时间的   分钟数\n",
    "\n",
    "if right_this_minute in odds:\n",
    "  print(\"this is minute seems a little odd\")\n",
    "else:\n",
    "    print(\"not an odd minute\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ced52d53",
   "metadata": {},
   "source": [
    "> 1.变量的定义\n",
    ">> *  **变量**用于存储在计算机程序中引用和操作的信息。它们还提供了一种用描述性名称标记数据的方法，以便读者和我们自己能够更清楚地理解我们的程序。将变量看作包含信息的容器是有帮助的。它们的唯一目的是在内存中标记和存储数据。然后可以在整个程序中使用这些数据"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0d3442c8",
   "metadata": {},
   "source": [
    "> 2.变量名称的规范\n",
    ">> 1.变量名称只可以用 数字、字母和下划线来定义名称  \n",
    ">> 2.数字不可以作为变量名的第一个字符 （stu10001）  \n",
    ">> 3.内部（开发团队）已经使用过的名称不可以作为变量名,例如：  \n",
    ">> 4.如果你实在想定义一个已经被用过名字：global_zhichao \\ print_zhichao  \n",
    "`['and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda','not', 'or', 'pass', 'print','raise', 'return', 'try', 'while', 'with', 'yield']`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "a71279e0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Jack\n"
     ]
    }
   ],
   "source": [
    "# 变量实践1\n",
    "name = \"Jack\"\n",
    "print(name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "23f067a4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Yan Ruirong\n"
     ]
    }
   ],
   "source": [
    "# 变量实践2\n",
    "first_name =\"Yan\"\n",
    "last_name =\"Ruirong\"\n",
    "name = first_name +' '+last_name\n",
    "print(name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "e4911558",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Alex Alex\n",
      "Li,Alex Alex\n"
     ]
    }
   ],
   "source": [
    "name_01 = \"Alex\"\n",
    "name_02 = name_01\n",
    "\n",
    "print(name_01,name_02)\n",
    "\n",
    "name_01 = \"Li,Alex\"\n",
    "\n",
    "print(name_01,name_02)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cdea58e7",
   "metadata": {},
   "source": [
    "* 字符串可以被索引（下标）\n",
    "> 请大家尝试写下course_name[0] course_name[1] couese_name[2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "84f9f25b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'str'>\n"
     ]
    }
   ],
   "source": [
    "print(type(name_01))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "7e50ee42",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 以上结果原因\n",
    "# Python是一门解释性语言，是一行一行执行的，没有特定的要求，是不会重复运行上一行的代码"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "77d5ea3f",
   "metadata": {},
   "source": [
    "* 已经完成上述的同学：\n",
    "\n",
    "> 1.阅读字符串概念\n",
    ">>1.[字符串](https://docs.python.org/3/tutorial/introduction.html#strings)  \n",
    ">>2.[字符串的方法](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)  \n",
    "\n",
    ">2.阅读数值概念   \n",
    ">>1.[数值](https://docs.python.org/3/tutorial/introduction.html#numbers)  \n",
    ">>2.[数值的方法](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "10a764f2",
   "metadata": {},
   "source": [
    "### 字符串"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "415ab879",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-44-8e4b77719ebf>, line 2)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-44-8e4b77719ebf>\"\u001b[1;36m, line \u001b[1;32m2\u001b[0m\n\u001b[1;33m    phrase = 'doesn't' # 语法错误\u001b[0m\n\u001b[1;37m                    ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "# invalid syntax  语法错误\n",
    "phrase = 'doesn't' # 语法错误\n",
    "phrase"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "f119e839",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"doesn't\""
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"don't\" #解决方案1\n",
    "'doesn\\'t' #解决方案2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "de0c316b",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 字符串 三引号 \"\"\"  \"\"\"  或者 '''   '''\n",
    "# 三引号 可以存储较为复杂的文本数据（例如可以存 其他语言的 数据）\n",
    "广州南方学院官网_HTML = \"\"\"\n",
    "<div class=\"lin-header \">\n",
    "\t\t<div class=\"lin-head clearfix\">\n",
    "\t\t\t<h1 class=\"lin-topl\">\n",
    "\t\t\t\t<a href=\"index.htm\" target=\"_blank\" title=\"广州南方学院\">\n",
    "\t\t\t\t\t<img src=\"images/logo.png\">\n",
    "\t\t\t\t</a>\n",
    "\t\t\t</h1>\n",
    "\t\t\t<div class=\"lin-topr\">\n",
    "\t\t\t\t<div class=\"lin-youxiang\">\n",
    "\t\t\t\t\t<!--<a href=\"http://oa.nfu.edu.cn/\" target=\"_blank\">办公系统</a>-->\n",
    "\t\t\t\t\t<a href=\"xcyx/index.htm\">校长邮箱</a>\n",
    "\t\t\t\t\t<a href=\"http://en.nfu.edu.cn/\">English Version</a>\n",
    "\t\t\t\t\t\t<!-- <a href=\"https://mail.nfu.edu.cn/\" target=\"_blank\">邮箱登录</a>\n",
    "\t\t\t\t\t\t\t<a href=\"mailto:nfcsysuyz@126.com\" target=\"_blank\" title=\"nfcsysuyz@126.com\" >院长信箱</a> -->\n",
    "\t\t\t\t</div>\n",
    "\t\t\t\t<div class=\"lin-ser lin-serhide\">\n",
    "\t\t\t\t\t<div class=\"serbox\">\n",
    "\t\t\t\t\t\t<form action=\"/cms/web/search/index.jsp\" method=\"get\" id=\"search_form\">\n",
    "\t\t\t\t\t\t\t<input name=\"siteID\" value=\"bbef6bf928be491d9180b44993df0ac9\" type =\"hidden\"> \n",
    "\t\t\t\t\t\t\t<input type=\"text\" name=\"query\" id=\"keyword\" placeholder=\"搜索\">\n",
    "\t\t\t\t\t\t\t<a href=\"javascript:;\" id=\"search_btn\">\n",
    "\t\t\t\t\t\t\t</a>\n",
    "\t\t\t\t\t\t</form>\t\n",
    "\t\t\t\t\t\t<script type=\"text/javascript\">\n",
    "\t\t\t\t\t\t\t$(\"#search_btn\").click(function(){\n",
    "\t\t\t\t\t\t\t\tvar keyword=$(\"#keyword\").val();\n",
    "\t\t\t\t\t\t\t\tif(keyword==''){\n",
    "\t\t\t\t\t\t\t\t\talert('* 请输入搜索关键词 !');\n",
    "\t\t\t\t\t\t\t\t\t$(\"#keyword\").focus();\n",
    "\t\t\t\t\t\t\t\t\treturn false;\n",
    "\t\t\t\t\t\t\t\t}else{\n",
    "\t\t\t\t\t\t\t\t\t$(\"#search_form\").submit();\n",
    "\t\t\t\t\t\t\t\t}\n",
    "\t\t\t\t\t\t\t})\n",
    "\t\t\t\t\t\t</script>\n",
    "\t\t\t\t\t</div>\n",
    "\t\t\t\t\t\n",
    "\t\t\t\t</div>\n",
    "\t\t\t</div>\n",
    "\t\t</div>\n",
    "\t</div>\n",
    "\"\"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "id": "e4ad1525",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'\\n<div class=\"lin-header \">\\n\\t\\t<div class=\"lin-head clearfix\">\\n\\t\\t\\t<h1 class=\"lin-topl\">\\n\\t\\t\\t\\t<a href=\"index.htm\" target=\"_blank\" title=\"广州南方学院\">\\n\\t\\t\\t\\t\\t<img src=\"images/logo.png\">\\n\\t\\t\\t\\t</a>\\n\\t\\t\\t</h1>\\n\\t\\t\\t<div class=\"lin-topr\">\\n\\t\\t\\t\\t<div class=\"lin-youxiang\">\\n\\t\\t\\t\\t\\t<!--<a href=\"http://oa.nfu.edu.cn/\" target=\"_blank\">办公系统</a>-->\\n\\t\\t\\t\\t\\t<a href=\"xcyx/index.htm\">校长邮箱</a>\\n\\t\\t\\t\\t\\t<a href=\"http://en.nfu.edu.cn/\">English Version</a>\\n\\t\\t\\t\\t\\t\\t<!-- <a href=\"https://mail.nfu.edu.cn/\" target=\"_blank\">邮箱登录</a>\\n\\t\\t\\t\\t\\t\\t\\t<a href=\"mailto:nfcsysuyz@126.com\" target=\"_blank\" title=\"nfcsysuyz@126.com\" >院长信箱</a> -->\\n\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t<div class=\"lin-ser lin-serhide\">\\n\\t\\t\\t\\t\\t<div class=\"serbox\">\\n\\t\\t\\t\\t\\t\\t<form action=\"/cms/web/search/index.jsp\" method=\"get\" id=\"search_form\">\\n\\t\\t\\t\\t\\t\\t\\t<input name=\"siteID\" value=\"bbef6bf928be491d9180b44993df0ac9\" type =\"hidden\"> \\n\\t\\t\\t\\t\\t\\t\\t<input type=\"text\" name=\"query\" id=\"keyword\" placeholder=\"搜索\">\\n\\t\\t\\t\\t\\t\\t\\t<a href=\"javascript:;\" id=\"search_btn\">\\n\\t\\t\\t\\t\\t\\t\\t</a>\\n\\t\\t\\t\\t\\t\\t</form>\\t\\n\\t\\t\\t\\t\\t\\t<script type=\"text/javascript\">\\n\\t\\t\\t\\t\\t\\t\\t$(\"#search_btn\").click(function(){\\n\\t\\t\\t\\t\\t\\t\\t\\tvar keyword=$(\"#keyword\").val();\\n\\t\\t\\t\\t\\t\\t\\t\\tif(keyword==\\'\\'){\\n\\t\\t\\t\\t\\t\\t\\t\\t\\talert(\\'* 请输入搜索关键词 !\\');\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$(\"#keyword\").focus();\\n\\t\\t\\t\\t\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t\\t\\t\\t\\t}else{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$(\"#search_form\").submit();\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t})\\n\\t\\t\\t\\t\\t\\t</script>\\n\\t\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t</div>\\n\\t\\t\\t</div>\\n\\t\\t</div>\\n\\t</div>\\n'"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "广州南方学院官网_HTML"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b9f56c31",
   "metadata": {},
   "source": [
    "* 字符串可以用+运算符连接（粘合在一起），并重复使用"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "id": "8a03afc6",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Xu Zhichao\n"
     ]
    }
   ],
   "source": [
    "# 字符串的拼接\n",
    "print(\"Xu\"+\" \"+\"Zhichao\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "36d2c178",
   "metadata": {},
   "source": [
    "* 字符串可以被索引（下标）\n",
    ">请大家尝试写下 course_name[0] course_name[1] course_name[2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "id": "f72097d2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'interactive-media-production'"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name =\"interactive-media-production\" \n",
    "course_name"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "371436c1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name.count(\"i\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "03a05bf6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'media'"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name[12]+course_name[13]+course_name[14]+course_name[15]+course_name[16]\n",
    "# 尝试取出media                                                                    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "70e21c1f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'media'"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name[12:17]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "6aeb9d56",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'i'"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name[-3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "fb5be690",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'ct'"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name[-5:-3]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f8414fa4",
   "metadata": {},
   "source": [
    "* 切片（slice）的性质：\n",
    "> 1.[值1：值2] 值1<值2  \n",
    "> 2.[值1：值2] 值2是取不到的"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4f81cbc1",
   "metadata": {},
   "source": [
    "* 后面还有，请同学们先自己来尝试练习噢~自觉决定高度~"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "975cd39d",
   "metadata": {},
   "source": [
    "## 数值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "5eb8c799",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "300"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "100+200"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "e8c94ea0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'int'>\n"
     ]
    }
   ],
   "source": [
    "print(type(2021))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "id": "810e1de0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'float'>\n"
     ]
    }
   ],
   "source": [
    "print(type(3.1415926))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "4421bd99",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'complex'>\n"
     ]
    }
   ],
   "source": [
    "print(type(3+2j))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d9b4eff7",
   "metadata": {},
   "source": [
    "### 数值和字符串 要分清！！！傻傻分不清！"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "fae7f22f",
   "metadata": {},
   "outputs": [],
   "source": [
    "a =\"50\"# 引号括起来的不是数值，哪怕它里面是数值\n",
    "b =40"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "id": "8ed8aaf5",
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "can only concatenate str (not \"int\") to str",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-60-bd58363a63fc>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0ma\u001b[0m \u001b[1;33m+\u001b[0m \u001b[0mb\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m: can only concatenate str (not \"int\") to str"
     ]
    }
   ],
   "source": [
    "a + b"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4b9be83f",
   "metadata": {},
   "source": [
    "### 课后作业（打印当天课表）"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "43a4c776",
   "metadata": {},
   "source": [
    "* 1.使用time获取当天是周几？\n",
    "* 2.获取到周几后，print（\"上午9:45-12:00————xxx课程，好开心啊\"）可以尝试打印的好看一点"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 219,
   "id": "2fd347d7",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3\n"
     ]
    }
   ],
   "source": [
    "import time\n",
    "weekly=time.strftime(\"%w\")\n",
    "print(weekly)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 224,
   "id": "e6d8ddc3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "难过\n"
     ]
    }
   ],
   "source": [
    "weekly=time.strftime(\"%w\")\n",
    "if weekly == \"0\":\n",
    "    print(\"难过\")\n",
    "elif weekly == \"1\":\n",
    "    print(\"难过\")\n",
    "elif weekly == \"2\":\n",
    "    print(\"难过\")\n",
    "elif weekly == \"3\":\n",
    "    print(\"难过\")\n",
    "elif weekly == \"4\":\n",
    "    print(\"难过\")\n",
    "else :\n",
    "    print(\"开心\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "id": "8f9d3d80",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on built-in module time:\n",
      "\n",
      "NAME\n",
      "    time - This module provides various functions to manipulate time values.\n",
      "\n",
      "DESCRIPTION\n",
      "    There are two standard representations of time.  One is the number\n",
      "    of seconds since the Epoch, in UTC (a.k.a. GMT).  It may be an integer\n",
      "    or a floating point number (to represent fractions of seconds).\n",
      "    The Epoch is system-defined; on Unix, it is generally January 1st, 1970.\n",
      "    The actual value can be retrieved by calling gmtime(0).\n",
      "    \n",
      "    The other representation is a tuple of 9 integers giving local time.\n",
      "    The tuple items are:\n",
      "      year (including century, e.g. 1998)\n",
      "      month (1-12)\n",
      "      day (1-31)\n",
      "      hours (0-23)\n",
      "      minutes (0-59)\n",
      "      seconds (0-59)\n",
      "      weekday (0-6, Monday is 0)\n",
      "      Julian day (day in the year, 1-366)\n",
      "      DST (Daylight Savings Time) flag (-1, 0 or 1)\n",
      "    If the DST flag is 0, the time is given in the regular time zone;\n",
      "    if it is 1, the time is given in the DST time zone;\n",
      "    if it is -1, mktime() should guess based on the date and time.\n",
      "\n",
      "CLASSES\n",
      "    builtins.tuple(builtins.object)\n",
      "        struct_time\n",
      "    \n",
      "    class struct_time(builtins.tuple)\n",
      "     |  struct_time(iterable=(), /)\n",
      "     |  \n",
      "     |  The time value as returned by gmtime(), localtime(), and strptime(), and\n",
      "     |  accepted by asctime(), mktime() and strftime().  May be considered as a\n",
      "     |  sequence of 9 integers.\n",
      "     |  \n",
      "     |  Note that several fields' values are not the same as those defined by\n",
      "     |  the C language standard for struct tm.  For example, the value of the\n",
      "     |  field tm_year is the actual year, not year - 1900.  See individual\n",
      "     |  fields' descriptions for details.\n",
      "     |  \n",
      "     |  Method resolution order:\n",
      "     |      struct_time\n",
      "     |      builtins.tuple\n",
      "     |      builtins.object\n",
      "     |  \n",
      "     |  Methods defined here:\n",
      "     |  \n",
      "     |  __reduce__(...)\n",
      "     |      Helper for pickle.\n",
      "     |  \n",
      "     |  __repr__(self, /)\n",
      "     |      Return repr(self).\n",
      "     |  \n",
      "     |  ----------------------------------------------------------------------\n",
      "     |  Static methods defined here:\n",
      "     |  \n",
      "     |  __new__(*args, **kwargs) from builtins.type\n",
      "     |      Create and return a new object.  See help(type) for accurate signature.\n",
      "     |  \n",
      "     |  ----------------------------------------------------------------------\n",
      "     |  Data descriptors defined here:\n",
      "     |  \n",
      "     |  tm_gmtoff\n",
      "     |      offset from UTC in seconds\n",
      "     |  \n",
      "     |  tm_hour\n",
      "     |      hours, range [0, 23]\n",
      "     |  \n",
      "     |  tm_isdst\n",
      "     |      1 if summer time is in effect, 0 if not, and -1 if unknown\n",
      "     |  \n",
      "     |  tm_mday\n",
      "     |      day of month, range [1, 31]\n",
      "     |  \n",
      "     |  tm_min\n",
      "     |      minutes, range [0, 59]\n",
      "     |  \n",
      "     |  tm_mon\n",
      "     |      month of year, range [1, 12]\n",
      "     |  \n",
      "     |  tm_sec\n",
      "     |      seconds, range [0, 61])\n",
      "     |  \n",
      "     |  tm_wday\n",
      "     |      day of week, range [0, 6], Monday is 0\n",
      "     |  \n",
      "     |  tm_yday\n",
      "     |      day of year, range [1, 366]\n",
      "     |  \n",
      "     |  tm_year\n",
      "     |      year, for example, 1993\n",
      "     |  \n",
      "     |  tm_zone\n",
      "     |      abbreviation of timezone name\n",
      "     |  \n",
      "     |  ----------------------------------------------------------------------\n",
      "     |  Data and other attributes defined here:\n",
      "     |  \n",
      "     |  n_fields = 11\n",
      "     |  \n",
      "     |  n_sequence_fields = 9\n",
      "     |  \n",
      "     |  n_unnamed_fields = 0\n",
      "     |  \n",
      "     |  ----------------------------------------------------------------------\n",
      "     |  Methods inherited from builtins.tuple:\n",
      "     |  \n",
      "     |  __add__(self, value, /)\n",
      "     |      Return self+value.\n",
      "     |  \n",
      "     |  __contains__(self, key, /)\n",
      "     |      Return key in self.\n",
      "     |  \n",
      "     |  __eq__(self, value, /)\n",
      "     |      Return self==value.\n",
      "     |  \n",
      "     |  __ge__(self, value, /)\n",
      "     |      Return self>=value.\n",
      "     |  \n",
      "     |  __getattribute__(self, name, /)\n",
      "     |      Return getattr(self, name).\n",
      "     |  \n",
      "     |  __getitem__(self, key, /)\n",
      "     |      Return self[key].\n",
      "     |  \n",
      "     |  __getnewargs__(self, /)\n",
      "     |  \n",
      "     |  __gt__(self, value, /)\n",
      "     |      Return self>value.\n",
      "     |  \n",
      "     |  __hash__(self, /)\n",
      "     |      Return hash(self).\n",
      "     |  \n",
      "     |  __iter__(self, /)\n",
      "     |      Implement iter(self).\n",
      "     |  \n",
      "     |  __le__(self, value, /)\n",
      "     |      Return self<=value.\n",
      "     |  \n",
      "     |  __len__(self, /)\n",
      "     |      Return len(self).\n",
      "     |  \n",
      "     |  __lt__(self, value, /)\n",
      "     |      Return self<value.\n",
      "     |  \n",
      "     |  __mul__(self, value, /)\n",
      "     |      Return self*value.\n",
      "     |  \n",
      "     |  __ne__(self, value, /)\n",
      "     |      Return self!=value.\n",
      "     |  \n",
      "     |  __rmul__(self, value, /)\n",
      "     |      Return value*self.\n",
      "     |  \n",
      "     |  count(self, value, /)\n",
      "     |      Return number of occurrences of value.\n",
      "     |  \n",
      "     |  index(self, value, start=0, stop=9223372036854775807, /)\n",
      "     |      Return first index of value.\n",
      "     |      \n",
      "     |      Raises ValueError if the value is not present.\n",
      "\n",
      "FUNCTIONS\n",
      "    asctime(...)\n",
      "        asctime([tuple]) -> string\n",
      "        \n",
      "        Convert a time tuple to a string, e.g. 'Sat Jun 06 16:26:11 1998'.\n",
      "        When the time tuple is not present, current time as returned by localtime()\n",
      "        is used.\n",
      "    \n",
      "    ctime(...)\n",
      "        ctime(seconds) -> string\n",
      "        \n",
      "        Convert a time in seconds since the Epoch to a string in local time.\n",
      "        This is equivalent to asctime(localtime(seconds)). When the time tuple is\n",
      "        not present, current time as returned by localtime() is used.\n",
      "    \n",
      "    get_clock_info(...)\n",
      "        get_clock_info(name: str) -> dict\n",
      "        \n",
      "        Get information of the specified clock.\n",
      "    \n",
      "    gmtime(...)\n",
      "        gmtime([seconds]) -> (tm_year, tm_mon, tm_mday, tm_hour, tm_min,\n",
      "                               tm_sec, tm_wday, tm_yday, tm_isdst)\n",
      "        \n",
      "        Convert seconds since the Epoch to a time tuple expressing UTC (a.k.a.\n",
      "        GMT).  When 'seconds' is not passed in, convert the current time instead.\n",
      "        \n",
      "        If the platform supports the tm_gmtoff and tm_zone, they are available as\n",
      "        attributes only.\n",
      "    \n",
      "    localtime(...)\n",
      "        localtime([seconds]) -> (tm_year,tm_mon,tm_mday,tm_hour,tm_min,\n",
      "                                  tm_sec,tm_wday,tm_yday,tm_isdst)\n",
      "        \n",
      "        Convert seconds since the Epoch to a time tuple expressing local time.\n",
      "        When 'seconds' is not passed in, convert the current time instead.\n",
      "    \n",
      "    mktime(...)\n",
      "        mktime(tuple) -> floating point number\n",
      "        \n",
      "        Convert a time tuple in local time to seconds since the Epoch.\n",
      "        Note that mktime(gmtime(0)) will not generally return zero for most\n",
      "        time zones; instead the returned value will either be equal to that\n",
      "        of the timezone or altzone attributes on the time module.\n",
      "    \n",
      "    monotonic(...)\n",
      "        monotonic() -> float\n",
      "        \n",
      "        Monotonic clock, cannot go backward.\n",
      "    \n",
      "    monotonic_ns(...)\n",
      "        monotonic_ns() -> int\n",
      "        \n",
      "        Monotonic clock, cannot go backward, as nanoseconds.\n",
      "    \n",
      "    perf_counter(...)\n",
      "        perf_counter() -> float\n",
      "        \n",
      "        Performance counter for benchmarking.\n",
      "    \n",
      "    perf_counter_ns(...)\n",
      "        perf_counter_ns() -> int\n",
      "        \n",
      "        Performance counter for benchmarking as nanoseconds.\n",
      "    \n",
      "    process_time(...)\n",
      "        process_time() -> float\n",
      "        \n",
      "        Process time for profiling: sum of the kernel and user-space CPU time.\n",
      "    \n",
      "    process_time_ns(...)\n",
      "        process_time() -> int\n",
      "        \n",
      "        Process time for profiling as nanoseconds:\n",
      "        sum of the kernel and user-space CPU time.\n",
      "    \n",
      "    sleep(...)\n",
      "        sleep(seconds)\n",
      "        \n",
      "        Delay execution for a given number of seconds.  The argument may be\n",
      "        a floating point number for subsecond precision.\n",
      "    \n",
      "    strftime(...)\n",
      "        strftime(format[, tuple]) -> string\n",
      "        \n",
      "        Convert a time tuple to a string according to a format specification.\n",
      "        See the library reference manual for formatting codes. When the time tuple\n",
      "        is not present, current time as returned by localtime() is used.\n",
      "        \n",
      "        Commonly used format codes:\n",
      "        \n",
      "        %Y  Year with century as a decimal number.\n",
      "        %m  Month as a decimal number [01,12].\n",
      "        %d  Day of the month as a decimal number [01,31].\n",
      "        %H  Hour (24-hour clock) as a decimal number [00,23].\n",
      "        %M  Minute as a decimal number [00,59].\n",
      "        %S  Second as a decimal number [00,61].\n",
      "        %z  Time zone offset from UTC.\n",
      "        %a  Locale's abbreviated weekday name.\n",
      "        %A  Locale's full weekday name.\n",
      "        %b  Locale's abbreviated month name.\n",
      "        %B  Locale's full month name.\n",
      "        %c  Locale's appropriate date and time representation.\n",
      "        %I  Hour (12-hour clock) as a decimal number [01,12].\n",
      "        %p  Locale's equivalent of either AM or PM.\n",
      "        \n",
      "        Other codes may be available on your platform.  See documentation for\n",
      "        the C library strftime function.\n",
      "    \n",
      "    strptime(...)\n",
      "        strptime(string, format) -> struct_time\n",
      "        \n",
      "        Parse a string to a time tuple according to a format specification.\n",
      "        See the library reference manual for formatting codes (same as\n",
      "        strftime()).\n",
      "        \n",
      "        Commonly used format codes:\n",
      "        \n",
      "        %Y  Year with century as a decimal number.\n",
      "        %m  Month as a decimal number [01,12].\n",
      "        %d  Day of the month as a decimal number [01,31].\n",
      "        %H  Hour (24-hour clock) as a decimal number [00,23].\n",
      "        %M  Minute as a decimal number [00,59].\n",
      "        %S  Second as a decimal number [00,61].\n",
      "        %z  Time zone offset from UTC.\n",
      "        %a  Locale's abbreviated weekday name.\n",
      "        %A  Locale's full weekday name.\n",
      "        %b  Locale's abbreviated month name.\n",
      "        %B  Locale's full month name.\n",
      "        %c  Locale's appropriate date and time representation.\n",
      "        %I  Hour (12-hour clock) as a decimal number [01,12].\n",
      "        %p  Locale's equivalent of either AM or PM.\n",
      "        \n",
      "        Other codes may be available on your platform.  See documentation for\n",
      "        the C library strftime function.\n",
      "    \n",
      "    thread_time(...)\n",
      "        thread_time() -> float\n",
      "        \n",
      "        Thread time for profiling: sum of the kernel and user-space CPU time.\n",
      "    \n",
      "    thread_time_ns(...)\n",
      "        thread_time() -> int\n",
      "        \n",
      "        Thread time for profiling as nanoseconds:\n",
      "        sum of the kernel and user-space CPU time.\n",
      "    \n",
      "    time(...)\n",
      "        time() -> floating point number\n",
      "        \n",
      "        Return the current time in seconds since the Epoch.\n",
      "        Fractions of a second may be present if the system clock provides them.\n",
      "    \n",
      "    time_ns(...)\n",
      "        time_ns() -> int\n",
      "        \n",
      "        Return the current time in nanoseconds since the Epoch.\n",
      "\n",
      "DATA\n",
      "    altzone = -32400\n",
      "    daylight = 0\n",
      "    timezone = -28800\n",
      "    tzname = ('中国标准时间', '中国夏令时')\n",
      "\n",
      "FILE\n",
      "    (built-in)\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(time)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "717a535f",
   "metadata": {},
   "outputs": [],
   "source": [
    "weekly\n",
    "周一至周五的课程 = \"\"\n",
    "if weely == 1:\n",
    "    print(周一的课程)\n",
    "elif weekly ==2:\n",
    "    print(周二的课程)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
